{% extends '../../../layout/admin-base.html' %}
<script src="{{ assets_path("js/base.js")}}"></script>
{% block page %}
<h3 class="page-title">
    维修人员信息 <small>列表</small>
</h3>
<ul class="breadcrumb">
    <li>
        <i class="icon-home"></i>
        <a href="index.html">基本信息管理</a> 
        <i class="icon-angle-right"></i>
    </li>
    <li>
        <a href="{{url('admin/user/repairman')}}">维修人员信息管理</a>
        <i class="icon-angle-right"></i>
    </li>
    <li><span>列表</span></li>
</ul>
{% end%}
{% block content %}

<div class="row-fluid">
    <div class="span12">
        <div class="portlet box red">
            <div class="portlet-title">
                <div class="caption"><i class="icon-search"></i>搜索条件</div>
                <div class="tools">
                    <a href="javascript:;" class="collapse"></a>
                </div>
            </div>
            <div class="portlet-body form">
                <!-- BEGIN FORM-->
                <form action="{{url('admin/user/repairman/search')}}" method="get" class="horizontal-form">
                    <div class="row-fluid">
                        <div class="span3">
                            <div class="control-group">
                                <label class="control-label" for="manName">维修人员姓名</label>
                                <div class="controls">
                                {% try %}
                                    {% if len(ser_list)> 0 %}
                                    <input type="text" id="manName" name="manName" class="m-wrap span12" value="{{ser_list[0]}}" placeholder="">
                                    {% end %}
                                {% except %}
                                    <input type="text" id="manName" name="manName" class="m-wrap span12" placeholder="">
                                {% end %}
                                </div>
                            </div>
                        </div>
                        <div class="span3">
                            <div class="control-group">
                                <label class="control-label" for="tel">手机号</label>
                                <div class="controls">
                                {% try %}
                                    {% if len(ser_list)> 0 %}
                                    <input type="text" id="tel" name="tel" class="m-wrap span12" placeholder="" value="{{ser_list[1]}}">
                                    {% end %}
                                {% except %}
                                    <input type="text" id="tel" name="tel" class="m-wrap span12" placeholder="" value="">
                                {% end %}
                                </div>
                            </div>
                        </div>
                        <div class="span3">
                            <div class="control-group">
                                <label class="control-label">维修类型</label>
                                <div class="controls">
                                {% try %}
                                    {% if len(ser_list)> 0 %}
                                        <select class="m-wrap span12" name="workType">
                                            <option value="">全部</option>
                                        {%for key in type_list%}
                                            {% if key == ser_list[2]%}
                                            <option value="{{key}}" selected="selected">{{type_list[key]}}</option>
                                            {%else%}
                                            <option value="{{key}}">{{type_list[key]}}</option>
                                            {%end%}
                                        {%end %}
                                        </select>
                                    {% end %}
                                {% except %}
                                    <select class="m-wrap span12" name="workType">
                                        <option value="">全部</option>
                                    {%for key in type_list%}
                                        <option value="{{key}}">{{type_list[key]}}</option>
                                    {%end %}
                                    </select>
                                {% end %}
                                </div>
                            </div>
                        </div>
                    </div>
                    <!--/row-->
                    <div class="form-actions">
                        <button type="submit" class="btn blue"><i class="icon-search"></i>搜索</button>
                        <button type="button" class="btn">清空</button>
                    </div>
                </form>
                <!-- END FORM--> 
            </div>
        </div>
        <!-- BEGIN EXAMPLE TABLE PORTLET-->
        <div class="portlet box light-grey">
            <div class="portlet-title">
                <div class="caption"><i class="icon-list"></i>维修人员列表</div>
                <div class="tools">
                    <a href="javascript:;" class="collapse"></a>
                    <a href="#portlet-config" data-toggle="modal" class="config"></a>
                    <a href="javascript:;" class="reload"></a>
                    <!-- <a href="javascript:;" class="remove"></a> -->
                </div>
            </div>
            <div class="portlet-body">
                <div class="clearfix">
                    <div class="btn-group">
                        <a id="sample_editable_1_new" class="btn green" href="{{url('admin/user/repairman/new')}}">
                        增加<i class="icon-plus"></i>
                        </a>
                    </div>
                    <div class="btn-group pull-right">
                        <button class="btn dropdown-toggle" data-toggle="dropdown">工具<i class="icon-angle-down"></i>
                        </button>
                        <ul class="dropdown-menu pull-right">
                            <li><a href="#">打印</a></li>
                            <li><a href="#">另存为PDF</a></li>
                            <li><a href="#">另存为Excel</a></li>
                        </ul>
                    </div>
                </div>
                <table class="table table-striped table-bordered table-hover" id="sample_1">
                    <thead>
                        <tr>
                            <th style="width:8px;"><input type="checkbox" class="group-checkable" data-set="#sample_1 .checkboxes" /></th>
                            <th>维修人员姓名</th>
                            <th class="hidden-300">维修类型</th>
                            <th class="hidden-300">手机号</th>
                            <th class="hidden-300">创建时间</th>
                            <th ></th>
                        </tr>
                    </thead>
                    <tbody>
                        {% for i in man_list %}
                        <tr class="odd gradeX">
                            <input type="hidden" value="{{i['Fid']}}">
                            <td><input type="checkbox" class="checkboxes" value="1" /></td>
                            <td>{{i['Fname']}}</td>
                            <td>{{get_work_type(i['Fwork_id'])}}</td>
                            <td>{{i['Ftel']}}</td>
                            <td class="hidden-100">{{stamp_2_time(i['Fcreate_time'])}}</td>
                            <td ><a class="btn mini purple" href="{{url('admin/user/repairman/edit/?id='+i['Fid'])}}"><i class="icon-edit"></i>编辑</a>
                                <a class="btn mini black" href="{{url('admin/user/repairman/del/?id='+i['Fid'])}}"><i class="icon-trash"></i>删除</a>
                            </td>
                        </tr>
                        {% end %}

                    </tbody>
                </table>
                {% module Paginate(page_info['total'], page_info['page']) %}
            </div>
        </div>
        <!-- END EXAMPLE TABLE PORTLET-->
    </div>
</div>
{% end%}